#include "Force.h"

unsigned int e3d::physics::Force::s_numForces = 0;
ID3D10EffectScalarVariable* e3d::physics::Force::s_countForces = 0;
ID3D10EffectVectorVariable* e3d::physics::Force::s_forceDirection = 0;

e3d::physics::Force::Force( const D3DXVECTOR3& initialForce )
:	m_instanceID( s_numForces++ ), 
	m_force( initialForce )
{
	s_countForces->SetInt( s_numForces );
}

void e3d::physics::Force::getHandles( ID3D10Effect* effect )
{
	s_countForces = effect->GetVariableByName("countForces")->AsScalar();
	s_forceDirection = effect->GetVariableByName("forceDirection")->AsVector();
}